package com.coffee.admin.service.platform.dao;

import com.coffee.admin.api.platform.query.PlatformRoleRelationQuery;
import com.coffee.admin.service.platform.bean.PlatformRoleRelation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PlatformRoleRelationDao {
    public PlatformRoleRelation findById(Integer id);

    public PlatformRoleRelation findByIdForUpdate(Integer id);

    public List<PlatformRoleRelation> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") PlatformRoleRelationQuery param);

    public Integer countByPlatformRoleId(Integer platformRoleId);

    public List<PlatformRoleRelation> page(@Param("param") PlatformRoleRelationQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<PlatformRoleRelation> list(@Param("param") PlatformRoleRelationQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public PlatformRoleRelation findFirst(@Param("param") PlatformRoleRelationQuery param);

    public Integer insert(PlatformRoleRelation param);

    Integer insertBatch(@Param("platformId") Integer platformId, @Param("roleIdList") List<Integer> roleIdList);

    public void updateById(@Param("param") PlatformRoleRelation param);

    public Integer deleteById(Integer id);

    public Integer deleteByPlatformId(Integer platformId);

    public Integer deleteByIds(List<Integer> idList);

    public List<Integer> findRoleIdListByPlatformId(@Param("platformId") Integer platformId);

}